package com.zzedu.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.zzedu.common.annotation.Excel;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 课程包管理对象 zz_course
 *
 * @author Mr.Wang
 * @date 2025-02-04
 */
@TableName("zz_course")
public class ZzCourse implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 课程包名称
     */
    @Excel(name = "课程包名称")
    @NotBlank(message = "课程包名称不能为空")
    private String name;

    /**
     * 正常
     */
    @Excel(name = "正常")
    @NotNull(message = "正常不能为空")
    private Integer state;

    /**
     * 添加时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime gmtModify;

    /**
     * 逻辑删除(0：未删除 1：id)
     */
    @TableLogic(delval = "id")
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;


    /**
     * APP 背景图
     */
    private Long appBackgroundImage;

    /**
     * PC-大屏 背景图
     */
    private Long pcBackgroundImage;


    /**
     * 课包级别
     */
    private String level;

    /**
     * 课时数
     */
    private Integer hourCount;

    /**
     * 课包费(元)
     */
    private BigDecimal hourAmount;

    /**
     * 绑定课程起始节
     */
    private Integer startNum;

    /**
     * 绑定课程结束节
     */
    private Integer endNum;

    @TableField(fill = FieldFill.INSERT)
    private Long createBy;
    @TableField(fill = FieldFill.UPDATE)
    private Long updateBy;
    /**
     * 序号 升序
     */
    private Integer sortNo;


    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getState() {
        return state;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtModify(LocalDateTime gmtModify) {
        this.gmtModify = gmtModify;
    }

    public LocalDateTime getGmtModify() {
        return gmtModify;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public Long getAppBackgroundImage() {
        return appBackgroundImage;
    }

    public void setAppBackgroundImage(Long appBackgroundImage) {
        this.appBackgroundImage = appBackgroundImage;
    }

    public Long getPcBackgroundImage() {
        return pcBackgroundImage;
    }

    public void setPcBackgroundImage(Long pcBackgroundImage) {
        this.pcBackgroundImage = pcBackgroundImage;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public Integer getHourCount() {
        return hourCount;
    }

    public void setHourCount(Integer hourCount) {
        this.hourCount = hourCount;
    }

    public BigDecimal getHourAmount() {
        return hourAmount;
    }

    public void setHourAmount(BigDecimal hourAmount) {
        this.hourAmount = hourAmount;
    }

    public Integer getStartNum() {
        return startNum;
    }

    public void setStartNum(Integer startNum) {
        this.startNum = startNum;
    }

    public Integer getEndNum() {
        return endNum;
    }

    public void setEndNum(Integer endNum) {
        this.endNum = endNum;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
